CREATE TABLE [dbo].[Book_Image]
(
[BookId] [int] NOT NULL,
[ImageId] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Book_Image] ADD CONSTRAINT [PK_Book_Image] PRIMARY KEY CLUSTERED  ([BookId], [ImageId]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Book_Image] ADD CONSTRAINT [FK_Book_Image_Book] FOREIGN KEY ([BookId]) REFERENCES [dbo].[Book] ([Id])
GO
ALTER TABLE [dbo].[Book_Image] ADD CONSTRAINT [FK_Book_Image_Image] FOREIGN KEY ([ImageId]) REFERENCES [dbo].[Image] ([Id])
GO
